package com.xgimi.open.skill.datamanager.biz.common.exception;


import com.xgimi.open.skill.datamanager.biz.common.Enum.ExceptionErrorCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author coderzpw.zhang
 * @version 1.0
 * @description 描述
 * @date 2023/2/3 15:02
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BizException extends BaseException {


    private static final long serialVersionUID = -5567950434052392581L;

    public BizException(ExceptionErrorCode errorCode) {
        super(errorCode.getCode(), errorCode.getMessage());
    }

    public BizException(String message) {
        super(ExceptionErrorCode.UN_KNOW_ERROR.getCode(), message);
    }

    public BizException(ExceptionErrorCode errorCode, String message) {
        super(errorCode.getCode(), errorCode.getMessage() + "|" + message);
    }
}
